// pages/demo3/demo3.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    Tabs:[{
      id:1,
      name:"首页",
      isActive:true
    },
    {
      id:2,
      name:"原创",
      isActive:false
    },
    {
      id:3,
      name:"关于",
      isActive:false
    },
    {
      id:4,
      name:"分类",
      isActive:false
    }]
  },
  onShareAppMessage: function () {

  },
handItemChange(e){
  const {index} = e.detail;
  let {Tabs} = this.data;
  Tabs.forEach((v,i) => (i==index?v.isActive=true:v.isActive=false));
    this.setData({
      Tabs
    })
  }
})